<?php
/**
 * Created by PhpStorm.
 * User: zhangxilu
 * Date: 2017/12/20
 * Time: 下午9:56
 */

namespace frontend\modules\v1\controllers;


use common\logic\CounterLogic;

use frontend\common\ApiController;

class SystemController extends ApiController
{
    /**
     * 获取平台统计数据
     * @return \yii\web\Response
     */
    public function actionGetSiteCounter()
    {

        $result = CounterLogic::instance()->getSiteCounter();
        if($result ===false){
            return $this->error('数据不存在');
        }
        return $this->success($result);

    }

}